package com.rchat.pocmini.activity.main;

import com.aso.common.http.delegate.HttpCallbackImpl;
import com.aso.common.http.utils.HttpUtils;
import com.rchat.pocmini.global.HttpCodeGlobal;
import com.rchat.pocmini.global.RequestParam;
import com.rchat.pocmini.global.UrlsGlobal;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by itsdf07 on 2017/7/25.
 */

public class MainModelImpl implements MainContract.Model {
    @Override
    public void queryJPushMessage(String userName, HttpCallbackImpl callback) {
        Map<String, String> param = new HashMap<>();
        param.put("userName", userName);

        //body = {"code":1016,"data":{"platform":1,"version":"1.0","enterprise":1,"userName":"111110000118"}}
        String body = RequestParam.requestRootParam(HttpCodeGlobal.REQ_CODE_1016, param);
        HttpUtils.postAsyn(UrlsGlobal.getUrl(UrlsGlobal.QUERY_PUSH_MESSAGE), body, callback);
    }
}
